// 状态管理
const state = {
  search: null,
  searchData: null
}

const actions = {
  setSearchIofo: ({commit, state}, res) => {
    commit('getSearchIofo', res)
  },
  setSearchDataInfo: ({commit, state}, res) => {
    commit('getSearchDataInfo', res)
  }
}

const mutations = {
  getSearchIofo: (state, res) => {
    state.search = res
    console.log(res)
  },
  getSearchDataInfo: (state, res) => {
    state.searchData = res
  }
}

export default {
  namespaced: true,
  state,
  actions,
  mutations
}
